#include<stdio.h>
int main()
{
	int i = 0;
	int j = 0;
	int arr[10][10] = { 0 };
	for (i = 0; i < 10; i++)
	{
		arr[i][0] = 1;
		for (j = 1; j <= i; j++)
		{
		
			arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
		}
	}
	for (i = 0; i < 10; i++)
	{
		for (j = 0; j <= i; j++)
		{
			printf("%-4d", arr[i][j]);
		}
		printf("\n");
	}

	return 0;
}